<?php
$dirList = explode ( '/', $_SERVER ['PHP_SELF'] );
$document_root = $_SERVER ["DOCUMENT_ROOT"];
require "$document_root/$dirList[1]/src/conf/conf.php";

$connMng = new ConnManger ( $db_conf, $mem_conf );
$connPar = $connMng->getConn_parser();

$type = $_GET['type'];
$pass = $_GET['pass'];
$userId = $_GET['userId'];
if ($type == 1){
	$record = News_admin_user_DAO::getRecord($userId, $connPar);
	if ($record != null && $record->getPassword() == $pass){
		echo 1;
	}else{
		echo 2;
	}
}elseif($type == 2){
	echo "aa";
}

?>